package org.example.DataStructure.SequenceList;

//顺序表的测试
public class SequenceListText {
    public static void main(String[] args) {
        //创建顺序表,并测试扩容机制
        SequenceList<String> s = new SequenceList<>(3);
        //测试插入
        s.insert("a");
        s.insert("b");
        s.insert("c");
        s.insert("d");
        s.insert(4,"e");
        System.out.println(s);
        //测试获取
        String getResult = s.get(2);
        System.out.println(getResult);
        //测试删除
        String getRemove = s.remove(3);
        System.out.println(getRemove);
        //测试顺序表的遍历
        for (String s1 : s){
            System.out.println(s1);
        }
        //测试清空
        s.clear();
        System.out.println(s);
    }
}
